<?php

namespace User;

use Config;
use PHPUnit\Framework\TestCase;
use stlswm\WeChatMp\MiniProgram;

include "../../vendor/autoload.php";
include '../Config.php';

class PhoneNumber extends TestCase
{
    public function testGetPhoneNumber()
    {
        $mp = MiniProgram::instance(Config::AppId, Config::Secret);
        $mp->setAccessToken(Config::AccessToken);
        $userPhoneNumber = $mp->userPhoneNumber();
        $response = $userPhoneNumber->getPhoneNumber('46b6416b8d60c03e3137987ce4af8796c40c9599bbce3d38977d5ff9772c7434');
        var_dump($response);
        $this->assertEquals(true, $response->result);
    }
}